<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>发送短信验证码</title>
<script>
function sendMessage() {
    var button = document.getElementById("sendButton");
    var countdown = 60; // 设置倒计时秒数
    var intervalId = setInterval(function() {
        countdown--;
        button.textContent = "还剩" + countdown + "秒再次单击";
        button.disabled = true;
        if (countdown <= 0) {
            clearInterval(intervalId);
            button.textContent = "发送";
            button.disabled = false;
        }
    }, 1000); // 每秒更新一次

    // 这里添加发送短信的代码
    alert("短信已发送，请查收！");
}

</script>
</head>
<body>

<label for="phone">手机号码:</label>
<input type="text" id="phone" name="phone" required>

<button id="sendButton" onclick="sendMessage()">发送</button>

</body>
</html>